<div id="cvr_hpslideshow" class="carousel">
  <div class="pager">
    <ul>
      <?php
      $carousel = '';
      foreach($images as $id => $image) {
        $class = ($id > 0) ? 'hide' : '';
        $active = ($id == 0) ? 'active' : '';
        print '<li class="' . $active . '" rel="' . $id . '"><a href="#">' . ($id+1) . '</a></li>';
        $carousel .= '<li class="' . $class . '" rel="' . $id . '">' . theme('imagecache', 'hp_slideshow_708x336', $image['filepath'], 'CVR slideshow image', $image['filename']) . '</li>';
      }
      ?>
    </ul>
  </div>
  
  <div class="inner-carousel">
    <ul id="hpslideshow">
    <?php print $carousel; ?>
    </ul>
  </div>
</div>